import java.util.*;
public class Main {
    public static void main(String[] agrs){
        Scanner in = new Scanner(System.in);
        char ret = '0';
        int max = 0;
        int[] a = new int[26];
        while(in.hasNext()){
            char[] ch = in.next().toCharArray();
            for(char c : ch){
                if(++a[c - 'a'] > max){
                    ret = c;
                    max = a[c - 'a'];
                }
            }
        }
        System.out.print(ret);
    }

}